/* 清空回收站 */
export const clearAll = () => {
  return axios({
    url: `/cms/articles`,
    method: 'delete'
  })
}

/* 删除行数据 */
export const collectionDel = (articleId) => {
  return axios({
    url: `cms/article/${articleId}`,
    method: 'delete'
  })
}
/* 还原 */
export const returnData = (articleId, type) => {
  return axios({
    url: `/cms/article/${articleId}/${type}`,
    method: 'put'
  })
}
/* 查询 */
export const searchCollectionData = (status, page, size, articleTitle) => {
  if (!articleTitle) {
    return axios({
      url: `cms/status/article/${status}/${page}/${size}`,
      method: 'get'
    })
  } else {
    return axios({
      url: `cms/status/article/${status}/${page}/${size}?articleTitle=${articleTitle}`,
      method: 'get'
    })
  }

}
